<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page   contentType="text/html;charset=UTF-8" language="java" %>
<%
	String path = request.getContextPath();
%>
<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title></title>
	<link rel="stylesheet" href="<%=path%>/css/Site.css" />
	<link rel="stylesheet" href="<%=path%>/css/zy.all.css" />
	<link rel="stylesheet" href="<%=path%>/css/font-awesome.min.css" />
	<link rel="stylesheet" href="<%=path%>/css/amazeui.min.css" />
	<link rel="stylesheet" href="<%=path%>/css/admin.css" />
</head>
<body>
<div class="am-cf admin-main" style="padding-top: 0px;">
	<!-- content start -->

	<div class="am-cf admin-main" style="padding-top: 0px;">
		<!-- content start -->
		<div class="admin-content">
			<div class="admin-content-body">

				<div class="am-g">
					<div class="am-u-sm-12 am-u-md-4 am-u-md-push-8">

					</div>
					<div class="am-u-sm-12 am-u-md-8 am-u-md-pull-4"
						 style="padding-top: 30px;">
						<form class="am-form am-form-horizontal"
							  action="<%=path%>/t_teacher/updatePassword">

							<div class="am-form-group">
								<label for="user-name" class="am-u-sm-3 am-form-label">
									原密码</label>
								<div class="am-u-sm-9">
									<input type="password" id="user-name" required
										   placeholder="原密码" name="oldPwd">

								</div>
							</div>
							<div class="am-form-group">
								<label for="user-name" class="am-u-sm-3 am-form-label">
									新密码</label>
								<div class="am-u-sm-9">
									<input type="password" id="pw" required
										   placeholder="新密码" name="newPwd1">

								</div>
							</div>
							<div class="am-form-group">
								<label for="user-name" class="am-u-sm-3 am-form-label">
									确认密码</label>
								<div class="am-u-sm-9">
									<input type="password" id="repw" required
										   placeholder="确认密码" name="newPwd2">
									<span id="tishi"></span>
								</div>
							</div>

							<div class="am-form-group">
								<div class="am-u-sm-9 am-u-sm-push-3">
									<input type="button" class="am-btn am-btn-success" name="sumbit" value="修改" onclick="checkpassword()" />
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
			<footer class="admin-content-footer">
				<hr>
				<p class="am-padding-left"></p>
			</footer>
		</div>
		<!-- content end -->
	</div>
	<!-- end-->
</body>
<script type="text/javascript">
    function checkpassword() {
        var password = document.getElementById("pw").value;
        var repassword = document.getElementById("repw").value;

        if(password == repassword) {
            var formElement = document.forms[0];
            //提交表单，提交到action属性指定的地方
            formElement.submit();
        }else {
            alert('登录密码不一致，请重新输入！');
            return false;
        }
    }
</script>

</html>
